<template>
	<view class="platform">
		<view class="title">
			<view class="title_left">
				<view class="pt">平台</view>
				<view class="sx">上新</view>
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/18/24878a833b374bf7beb8a0aa5525e85c.png" mode="widthFix" class="pao_ico"></image>
			</view>
			<view class="title_right" @click="goSeeMore()">
				<view class="">更多新品</view>
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/18/8f55b27c09e74d4492433e441435f4bd.png" mode="widthFix" class="dayu_ico"></image>
			</view>
		</view>
		<view class="platform-type">
			<image :src="item.images" mode="widthFix" v-for="(item,index) in platformList" :data-value="item.goods_url" @click="url_event"></image>
		</view>
	</view>
</template>

<script>
	export default{
		props:["platformList"],
		data(){
			return{
				
			}
		},
		methods:{
			goSeeMore(){
				uni.navigateTo({
					url:"/pages/goods_ring/goods_ring"
				})
			},
			url_event(e) {
			    var value = e.currentTarget.dataset.value || null;
				const replacedStr = value.split('-').join('_');
				// value.replace(new RegExp("-"), "_");
				console.log(replacedStr);
			    uni.navigateTo({
			    	url:replacedStr
			    })
			},
		}
	}
</script>

<style>
	.platform{
		width: 100%;
		margin-top: 20px;
		border-radius: 20px;
		background-color: white;
		padding-bottom: 15px;
	}
	.platform .title{
		width: 100%;
		/* padding-left: 25px; */
		border-radius: 20px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 10px;
		color: #d7251f;
	}
	.title_left,.title_right{
		display: flex;
	}
	.title_left{
		padding-left: 20rpx;
	}
	.title_right{
		font-size: 12px;
		padding-right: 38px;
	}
	.sx,.pt{
		color: #d7251f;
	}
	.pao_ico{
		width: 30px;
		height: 30px;
	}
	.dayu_ico{
		width: 15px;
		height: 15px;
	}
	.platform-type{
		display: flex;
		justify-content: space-around;
		margin-top: 15px;
	}
	.platform-type image{
		width: 57px;
		border-radius: 10px;
	}
	/* .platform_img{
		width: 57px;
		height: 68px !important;
	} */
</style>